﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Office.Master" AutoEventWireup="true"
    CodeBehind="Branch.aspx.cs" Inherits="Web.WebForm1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="BranchWrap">
        <p style="font-family: @楷体; color: Blue;">
            当前位置：<asp:Label ID="LblLocation" runat="server" Text="机构管理"></asp:Label></p>
        <br />
        <hr />      
        <table style=" text-align:right;">
            <tr>
                <td><asp:Label ID="LblBranchName" runat="server" Text="机构名称："></asp:Label>
                </td>
                <td><asp:TextBox ID="txtBranchName" runat="server"></asp:TextBox>
                </td>
                <td><asp:Label ID="LblBranchShortName" runat="server" Text="机构简称："></asp:Label>
                </td>
                <td><asp:TextBox ID="txtBranchShortName" runat="server"></asp:TextBox>
                </td>
                <td><asp:Label ID="LblPrincipalUser" runat="server" Text="负责人："></asp:Label>
                </td>
                <td> <asp:TextBox ID="txtPrincipalUser" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td> <asp:Label ID="LblConnectTelNo" runat="server" Text="联系电话："></asp:Label>
                </td>
                <td><asp:TextBox ID="txtConnectTelNo" runat="server"></asp:TextBox>
                </td>
                <td><asp:Label ID="lblConnectMobileTelNo" runat="server" Text="手机："></asp:Label>
                </td>
                <td><asp:TextBox ID="txtConnectMobileTelNo" runat="server"></asp:TextBox>
                </td>
                <td><asp:Label ID="LblFaxes" runat="server" Text="传真："></asp:Label>
                </td>
                <td> <asp:TextBox ID="txtFaxes" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
            <td colspan="6" align="center">
                <asp:Button ID="BtnAdd" runat="server" Text="添加" onclick="BtnAdd_Click" />
                <asp:Button ID="BtnUpdate"
                    runat="server" Text="保存修改" onclick="BtnUpdate_Click" /></td>
            </tr>
        </table>
    </div><br />
<asp:GridView ID="BranchGDV" runat="server" CellPadding="4" GridLines="None" 
        AutoGenerateColumns="False" DataKeyNames="BranchId" 
        DataSourceID="BranchSourceID" 
        onselectedindexchanging="BranchGDV_SelectedIndexChanging">
    <AlternatingRowStyle BackColor="White" />
    <Columns>
        <asp:BoundField DataField="BranchName" HeaderText="机构名称" />
        <asp:BoundField DataField="BranchShortName" HeaderText="机构简称" />
        <asp:BoundField DataField="PrincipalUser" HeaderText="负责人" />
        <asp:BoundField DataField="ConnectTelNo" HeaderText="联系电话" />
        <asp:BoundField DataField="BranchId" Visible="False" />
        <asp:BoundField DataField="ConnectMobileTelNo" Visible="False" />
        <asp:BoundField DataField="Faxes" Visible="False" />
        <asp:CommandField EditImageUrl="~/images/edit.gif" HeaderText="修改" 
            ShowSelectButton="True" />
        <asp:CommandField HeaderText="删除" ShowDeleteButton="True" />
    </Columns>
    <EditRowStyle BackColor="#7C6F57" />
    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
    <RowStyle BackColor="#E3EAEB" />
    <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
    <SortedAscendingCellStyle BackColor="#F8FAFA" />
    <SortedAscendingHeaderStyle BackColor="#246B61" />
    <SortedDescendingCellStyle BackColor="#D4DFE1" />
    <SortedDescendingHeaderStyle BackColor="#15524A" />
</asp:GridView>
    <asp:ObjectDataSource ID="BranchSourceID" runat="server" 
        SelectMethod="GetAllBranch" TypeName="PBOffice.BLL.BranchManager" 
        DeleteMethod="DeleteBranch">
        <DeleteParameters>
            <asp:Parameter Name="BranchId" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>
</asp:Content>
